1. Field of the Invention
This invention relates to a game system which reads out data of an imaginary game field constituted by a plurality of areas to be displayed in various scenes during the game and produces display images. This invention also relates to a judgment table producing method for producing the judgment table used in the game system, and a computer-readable storage medium carrying the game program.
2. Description of Related Art
As a game system of this kind, there is known a game system which displays a battle field including obstacles such as walls and/or fences on a screen of a display device. The game system provides such an imaginary experience that a character controlled by a user fights with enemy characters by weapons or advances to a destination with hiding himself behind the obstacles. In the game system, the computer of the game system calculates whether or not the character controlled by the user (hereinafter referred to as xe2x80x9cplayer-characterxe2x80x9d) enters the imaginary visual field of the enemy character controlled by the computer. If the computer judges that the player-character enters the imaginary visual field of the enemy character, the computer controls the action of the enemy character after calculating the shortest distance from the enemy character to the player-character and/or calculating the area where the enemy character can avoid the attack with weapon by the player-character.
However, in such a game system, since the positional relationship between the player-character and the enemy character is calculated every time the character is moved, the computer""s processing load is quite high. Especially, when a plurality of enemy characters are displayed and moved simultaneously within the imaginary game field, the processing load increases, and hence it is difficult to achieve quick and appropriate action of the enemy characters.
It is an object of the present invention to provide a game system in which the processing load of the computer is reduced and the characters in the game can make quick and appropriate action.
It is another object of the present invention to provide a judgment table producing method for the above game system.
It is still another object of the present invention to provide a computer-readable storage medium carrying the game program and suitably used by the above game system.
According to one aspect of the present invention, there is provided a game system including: a storage device for storing data of imaginary game field constituted by a plurality of areas to be displayed in scenes of game; and a control device for advancing the game according a predetermined program and reading out the data of the imaginary game field from the storage device to produce images to be displayed, wherein the control device includes: a judgment table producing means for judging whether or not an imaginary visual filed of a character located in an area includes another character located in another area, for each area of all areas in the imaginary game field in which the character can be located, when the data of the imaginary game field is read out, and for producing judgment tables based on judgment results; and a unit for controlling action of the character located in the areas of the imaginary game field based on the judgment tables.
In accordance with the game system thus configured, when the data of the imaginary game field is read out, it is judged whether or not a character located in an area can be seen by another character located in another area. This judgment is performed for all other areas of the imaginary game field in which the character can be located. The one area of the imaginary game field is changed one by one, and the judgment is executed to produce judgment tables. The control unit controls the action of the character based on the judgment tables. Therefore, it is unnecessary for the control unit to calculate the imaginary visual relation of the characters every time. The control unit can obtain information on the imaginary visual relation of the characters, e.g., the character in which area is visible or invisible, and in which area the character can hide himself, etc. Thus, the character""s action can be rapidly and appropriately controlled with reduced calculation load.
Preferably, the judgment table producing unit may include: a first unit for selecting one of the areas of the imaginary game field in which the character can be located as a judgment start zone and for selecting one of a plurality of coordinate points within the judgment start zone as a judgment start point; a second unit for selecting one of the areas of the imaginary game field, which is other than the one selected as the judgment start zone and in which the character can be located, as an evaluation zone and for selecting a predetermined number of coordinate points within the evaluation zone as evaluation points; a third unit for judging, for the respective evaluation points, whether or not any obstacle exists on a straight line from the judgment start point to the evaluation point; a fourth unit for recording the evaluation points, for which the judgment result by the third unit indicates that obstacle exists on the straight line, as a point which is out of an imaginary visual field of the character located at the judgment start point and for recording the evaluation points, for which the judgment result by the third unit indicates that obstacle does not exist on the straight line, as a point which is within the imaginary visual field of the character located at the judgment start point; a fifth unit for selecting, in turn, all of the areas of the imaginary game field, which are other than the one selected as the judgment start zone and in which the character can be located, as the evaluation zone, and for selecting, in turn, all of the areas of the imaginary game field in which the character can be located as the judgment start zone; and a sixth unit for producing the judgment tables based on results of the recording by the fourth unit after all of the areas of the imaginary game field are selected as the judgment start zone.
By this, one of the areas of the imaginary game field, in which the character can be located, is selected as the judgment start zone, and a predetermined coordinate point in the judgment start zone is selected as a judgment start point. In addition, one of the areas of the imaginary game field, which are other than the one selected as the judgment start zone and in which the character can be located, is selected as the evaluation zone, and predetermined number of coordinate points in the evaluation zone are selected as the evaluation points. Then, for the respective evaluation points, it is determined if any obstacle exists on the straight line between the judgment start point and the evaluation point. If the obstacle exists, the evaluation point is recorded as out of the visual field. If the obstacle does not exist, the evaluation point is recoded as within the visual field. After the judgment and recording are completed for all areas of the imaginary game field, the judgment tables are produced.
The judgment start point in the judgment start zone may include a position of an imaginary viewpoint of the character when the character takes high posture at the predetermined coordinate position in the judgment start zone. The predetermined coordinate point in the judgment start zone may include a central coordinate point within the judgment start zone. Thus, actual judgment table may be produced.
The evaluation point in the evaluation zone may include a point of imaginary viewpoint of the character when the character takes a high posture at the coordinate point in the evaluation zone. Alternatively, the evaluation point in the evaluation zone may include a point of an imaginary viewpoint of the character when the character takes a low posture at the coordinate point in the evaluation zone. The judgment table producing unit may execute the judgment based on the imaginary viewpoints of the character when the character takes the high posture and the low posture at the coordinate point in the evaluation zone. Thus, the judgment table may be produced in consideration of various actions of the characters.
The evaluation zone may have a rectangular shape, and the predetermined number of coordinate points in the evaluation zone may include coordinate points of four corners of the evaluation zone having rectangular shape.
An imaginary height of the judgment start zone and an imaginary height of the evaluation zone within the imaginary game field may be different from each other. Thus, if the imaginary game field has difference in height, the judgment tables may be appropriately used.
According to another aspect of the present invention, there is provided a judgment table producing method for a game system which reads out data of imaginary game field constituted by a plurality of areas to be displayed in scenes of game to produce images to be displayed and controls action of character located in the areas of the imaginary game field based on produced judgment table when the data of the imaginary game field is read out, the method including the steps of: selecting one of the areas of the imaginary game field in which the character can be located as a judgment start zone, and selecting one of a plurality of coordinate points within the judgment start zone as a judgment start point; selecting one of the areas of the imaginary game field, which is other than the one selected as the judgment start zone and in which the character can be located, as an evaluation zone, and selecting a predetermined number of coordinate points within the evaluation zone as evaluation points; judging, for the respective evaluation points, whether or not any obstacle exists on a straight line from the judgment start point to the evaluation point; recording the evaluation points, for which the judgment result indicates that obstacle exists on the straight line, as a point which is out of an imaginary visual field of the character located at the judgment start point, and recording the evaluation points, for which the judgment result indicates that obstacle does not exist on the straight line, as a point which is within the imaginary visual field of the character located at the judgment start point; selecting, in turn, all of the areas of the imaginary game field, which are other than the judgment start zone and in which the character can be located, as the evaluation zone, and selecting, in turn, all of the areas of the imaginary game field in which the character can be located as the judgment start zone; and producing judgment tables based on results of the recording by the recording step after all of the areas of the imaginary game field are selected as the judgment start zone.
By this method, it is unnecessary to calculate the imaginary visual relation of the characters every time the character is moved, and information on the imaginary visual relation of the characters, e.g., the character in which area is visible or invisible, and in which area the character can hide himself, etc., can be readily obtained. Thus, the character""s action can be rapidly and appropriately controlled with reduced calculation load.
According to another aspect of the present invention, there is provided a computer-readable storage medium carrying a program which allows a computer in a game system to read out data of imaginary game field constituted by a plurality of areas to be displayed in scenes of game from a storage device to display images, the program controls the computer to function as: a judgment table producing unit for judging whether or not a character located in an area is within a visual field of another character located in another area, for all areas of the imaginary game field in which the character can be located, when the data of the imaginary game field is read out, and for producing judgment tables based on judgment results; and a unit for controlling action of the character located in the areas of the imaginary game field based on the judgment tables.
In accordance with the storage medium thus configured, by executing the program by the computer, the computer may function as the game system of the present invention.
Preferably, the judgment table producing unit may include: a first unit for selecting one of the areas of the imaginary game field in which the character can be located as a judgment start zone and for selecting one of a plurality of coordinate points within the judgment start zone as a judgment start point; a second unit for selecting one of the areas of the imaginary game field, which is other than the one selected as the judgment start zone and in which the character can be located, as an evaluation zone and for selecting a predetermined number of coordinate points within the evaluation zone as evaluation points; a third unit for judging, for the respective evaluation points, whether or not any obstacle exists on a straight line from the judgment start point to the evaluation point; a fourth unit for recording the evaluation points, for which the judgment result by the third unit indicates that obstacle exists on the straight line, as a point which is out of an imaginary visual field of the character located at the judgment start point and for recording the evaluation points, for which the judgment result by the third unit indicates that obstacle does not exist on the straight line, as a point which is within the imaginary visual field of the character located at the judgment start point; a fifth unit for selecting, in turn, all of the areas of the imaginary game field, which are other than the one selected as the judgment start zone and in which the character can be located, as the evaluation zone and for allowing the judging unit to judge and the recording unit to record, and for selecting, in turn, all of the areas of the imaginary game field in which the character can be located as the judgment start zone; and a sixth unit for producing the judgment tables based on results of the recording by the fourth unit after all of the areas of the imaginary game field are selected as the judgment start zone.
By this, one of the areas of the imaginary game field, in which the character can be located, is selected as the judgment start zone, and a predetermined coordinate point in the judgment start zone is selected as a judgment start point. In addition, one of the areas of the imaginary game field, which are other than the one selected as the judgment start zone and in which the character can be located, is selected as the evaluation zone, and predetermined number of coordinate points in the evaluation zone are selected as the evaluation points. Then, for the respective evaluation points, it is determined if any obstacle exists on the straight line between the judgment start point and the evaluation point. If the obstacle exists, the evaluation point is recorded as out of the visual field. If the obstacle does not exist, the evaluation point is recoded as within the visual field. After the judgment and recording are completed for all areas of the imaginary game field, the judgment tables are produced.
The judgment start point in the judgment start zone may include a position of an imaginary viewpoint of the character when the character takes high posture at the predetermined coordinate position in the judgment start zone. The predetermined coordinate point in the judgment start zone may include a central coordinate point within the judgment start zone. Thus, actual judgment table may be produced.
The evaluation point in the evaluation zone may include a point of imaginary viewpoint of the character when the character takes a high posture at the coordinate point in the evaluation zone. Alternatively, the evaluation point in the evaluation zone may include a point of an imaginary viewpoint of the character when the character takes a low posture at the coordinate point in the evaluation zone. The judgment table producing unit may execute the judgment based on the imaginary viewpoints of the character when the character takes the high posture and the low posture at the coordinate point in the evaluation zone. Thus, the judgment table may be produced in consideration of various actions of the characters.
The evaluation zone may have a rectangular shape, and the predetermined number of coordinate points in the evaluation zone may include coordinate points of four corners of the evaluation zone having rectangular shape.
An imaginary height of the judgment start zone and an imaginary height of the evaluation zone within the imaginary game field may be different from each other. Thus, if the imaginary game field has difference in height, the judgment tables may be appropriately used.
It is noted that the storage medium may be of various form such as a magnetic storage medium, an optical storage medium, a magneto-optical storage medium, and a semiconductor storage medium.
The nature, utility, and further features of this invention will be more clearly apparent from the following detailed description with respect to preferred embodiment of the invention when read in conjunction with the accompanying drawings briefly described below.